package cn.liutao.dish.entity.po;

import cn.liutao.common.entity.BaseEntity;
import cn.liutao.common.entity.Validation;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import java.io.Serializable;
import java.math.BigDecimal;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.GroupSequence;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.groups.Default;

/**
 * 口味表 实体类。
 *
 * @author liutao
 * @since 2023-11-01
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(value = "taste")
public class Taste extends BaseEntity implements Serializable {

    @Id(keyType = KeyType.Auto)
    @NotNull(groups = Validation.EditGroup.class,message = "id不能为null")
    private Integer id;

    /**
     * 口味名称
     */
    @NotBlank(groups = Validation.AddGroup.class,message = "名称不能为null")
    private String name;

    /**
     * 口味加价
     */
    private BigDecimal price;

    /**
     * 启用状态：0禁用，1启用
     */
    private Integer status;

}
